
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<%@ taglib uri="/WEB-INF/config/tld/fmt.tld" prefix="fmt"%>
<%@ taglib uri="http://ssh.org/selects" prefix="ssh"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
	String applicationPath = basePath + "/" + "application";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<link href="<%=path%>/css/jinmu_style.css" rel="stylesheet"
			type="text/css" />
		<script language="javascript" src="<%=path%>/js/util.js"></script>
	</head>
	<body>
		<html:form styleId="processForm"
			action="getProcessList.do?method=getProcessList">
			<input type="hidden" id="totalPage" value="${totalPage}" />
			<table cellspacing="0" cellpadding="0" width="98%" align="center"
				border="0" class="margtb5">
				<tr>
					<td align="left" class="padl5 lan12">
						<img src="<%=path%>/images/img-11.gif" width="12" height="12"></img>
						系统管理 &gt; 流程查看
					</td>
				</tr>
			</table>
				<table cellspacing="3" cellpadding="0" width="98%" align="center"
				border="0" class="kuang2 margtb5 hei12">
				<tr>
				<td width="2%" align="right">
						发起人：
					</td>
					<td width="5%">
						<html:text property="createname" />
					</td>
				    <td width="2%" align="right">
						流程名称：
					</td>
					<td width="5%">
						<ssh:select propertyName="bussType" pid="BUSS_TYPE"
										type="1" defaultName="${processForm.bussType}" />
					</td>
					
										<td width="2%" align="right">
						项目机构：
					</td>
					<td width="8%">
						<ssh:select propertyName="org" firstShow="Y" dataSource="collection" selectList="${orgSelect}"  type="1" defaultName="${processForm.org}"/> 
					</td>
					</tr>
					<tr>

					<td width="2%" align="right">
						发起时间：
					</td>
					<td width="10%">
						 <input type="text" flag="true" readonly="true"   name="startDateStr" readonly="true"  value="<bean:write name='processForm' property='startDate' format='yyyy-MM-dd'/>"
									onclick="popUpCalendarDlg(this)" />至
				     <input type="text"  readonly="true"  name="endDateStr" readonly="true"
									onclick="popUpCalendarDlg(this)"  value="<bean:write name='processForm' property='endDate' format='yyyy-MM-dd'/>"/>
					</td>
					
					<td width="2%">
						&nbsp;&nbsp;&nbsp;<input class="buttonbg" id="but_query" type="button"
							value="查询"
							name="but_query" style="cursor:hand;" onClick="query();" />
					</td>
					
					
					</tr>
					
		 
					
				
			</table>
			
			
			<table cellspacing="0" cellpadding="0" width="98%" align="center"
				border="0" class="margb5">
				
				<tr>
					<td>
						<fmt:bundle
							basename="com.application.yfproject.struts.ApplicationResources_yfproject">
							<display:table name="processList" class="simple" id="processTab"
								pagesize="15" partialList="true" style="width:100%;"
								defaultorder="descending" size="resultSize"
								requestURI="getProcessList.do?method=getProcessList">
							
				                <display:column property="bussType" style="width:10%; text-align:center;" decorator="com.manager.commons.DictCodeColumnDecorator" dictCode="BUSS_TYPE"
									title="流程名称"
									sortable="true"  />
								<display:column style="width:30%; text-align:center;"
									title="发起人"
									sortable="true" >
                                  <a  style="color:blue;" onclick="viewFlow('${processTab.procId}');" href="#" >${processTab.createname}</a> 
                                 </display:column> 
								<display:column property="createTime" style="width:10%; text-align:center;"
									title="发起时间"
									sortable="true" format="{0,date,yyyy-MM-dd HH:mm}" />
								<display:column property="state" style="width:6%; text-align:center;"
									title="流程状态"
									sortable="true"   />
		                        <display:column property="agent" style="width:10%; text-align:center;"
									title="待审批人"
									sortable="true"  />
				
								<display:column property="org" style="width:10%; text-align:center;"
									title="所属机构"
									sortable="true"  />


							</display:table>
						</fmt:bundle>
						
					</td>
				</tr>
			</table>

		</html:form>
	</body>
</html>
<script>

function query(){
	document.forms[0].action="getProcessList.do?method=getProcessList";
	document.forms[0].submit();
}
function viewFlow(processId){
	var url = "<%=path%>/workflow/trace.jsp?processId=" + processId;
	openWindow(url,1100,500);
}

</script>
